﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ShapeDemo
{
    /// <summary>
    /// 点
    /// </summary>
    public class DPoint
    {
        public double X { get; set; }
        public double Y { get; set; }
    }

    /// <summary>
    /// 基础Shape类
    /// </summary>
    [Serializable]
    public class ASPNETX_Shape
    {
        public CmmnProp CommonProperty { get; set; }

        public double X { get; set; }
        public double Y { get; set; }
    }
    
    /// <summary>
    /// 点
    /// </summary>
    [Serializable]
    public class ASPNETX_Point:ASPNETX_Shape
    {
        
    }

    /// <summary>
    /// 矩形
    /// </summary>
    [Serializable]
    public class ASPNETX_Rect:ASPNETX_Shape
    {
        public double Width { get; set; }
        public double Height { get; set; }
    }

    /// <summary>
    /// 圆
    /// </summary>
    [Serializable]
    public class ASPNETX_Ellipse : ASPNETX_Shape
    {
        public double Width { get; set; }
        public double Height { get; set; }
    }

    /// <summary>
    /// 面
    /// </summary>
    [Serializable]
    public class ASPNETX_Polygon : ASPNETX_Shape
    {
        public List<DPoint> PointsList { get; set; }

        public ASPNETX_Polygon()
        {
            PointsList = new List<DPoint>();
        }
    }

    /// <summary>
    /// 线
    /// </summary>
    [Serializable]
    public class ASPNETX_Polyline : ASPNETX_Shape
    {
        public List<DPoint> PointsList { get; set; }

        public ASPNETX_Polyline()
        {
            PointsList = new List<DPoint>();
        }
    }
}
